<template>
  <div class="home">
    <!-- 轮播图 -->
    <mt-swipe :auto="2000">
      <mt-swipe-item>
        <router-link to=''>
          <img
            src="../assets/images/banner1.png"
            alt=""
          >
        </router-link>
      </mt-swipe-item>
      <mt-swipe-item>
        <router-link to=''>
          <img
            src="../assets/images/banner1.png"
            alt=""
          >
        </router-link>
      </mt-swipe-item>
      <mt-swipe-item>
        <router-link to=''>
          <img
            src="../assets/images/banner1.png"
            alt=""
          >
        </router-link>
      </mt-swipe-item>
    </mt-swipe>
    <!-- 导航栏 -->
    <div class="nav clearfix" >
      <router-link to=''>
        <img
          src="../assets/images/nav1.png"
          alt=""
        >
      </router-link>
      <router-link to=''>
        <img
          src="../assets/images/nav2.png"
          alt=""
        >
      </router-link>
      <router-link to=''>
        <img
          src="../assets/images/nav3.png"
          alt=""
        >
      </router-link>
      <router-link to=''>
        <img
          src="../assets/images/nav4.png"
          alt=""
        >
      </router-link>
      <router-link to=''>
        <img
          src="../assets/images/nav5.png"
          alt=""
        >
      </router-link>
      <router-link to=''>
        <img
          src="../assets/images/nav2.png"
          alt=""
        >
      </router-link>
    </div>
    <!-- 商品列表 -->
    <div class="product clearfix" >
      <router-link
        to=''
        class="pbox"
      >
        <img
          src="../assets/images/product.jpg"
          alt=""
        >
        <p class="line2">商品名字商品名字商品名字商品名字商品名字商品名字商品名字商品名字</p>
        <div class="price"><span>&yen;200.00</span>&nbsp;&nbsp;<span><del>&yen;300.00</del></span></div>
        <mt-button type="primary">立即购买</mt-button>
      </router-link>
      <router-link
        to=''
        class="pbox"
      >
        <img
          src="../assets/images/product.jpg"
          alt=""
        >
        <p class="line2">商品名字商品名字商品名字商品名字商品名字商品名字商品名字商品名字</p>
        <div class="price"><span>&yen;200.00</span>&nbsp;&nbsp;<span><del>&yen;300.00</del></span></div>
        <mt-button type="primary">立即购买</mt-button>
      </router-link>
      <router-link
        to=''
        class="pbox"
      >
        <img
          src="../assets/images/product.jpg"
          alt=""
        >
        <p class="line2">商品名字商品名字商品名字商品名字商品名字商品名字商品名字商品名字</p>
        <div class="price"><span>&yen;200.00</span>&nbsp;&nbsp;<span><del>&yen;300.00</del></span></div>
        <mt-button type="primary">立即购买</mt-button>
      </router-link>
      <router-link
        to=''
        class="pbox"
      >
        <img
          src="../assets/images/product.jpg"
          alt=""
        >
        <p class="line2">商品名字商品名字商品名字商品名字商品名字商品名字商品名字商品名字</p>
        <div class="price"><span>&yen;200.00</span>&nbsp;&nbsp;<span><del>&yen;300.00</del></span></div>
        <mt-button type="primary">立即购买</mt-button>
      </router-link>
      <router-link
        to=''
        class="pbox"
      >
        <img
          src="../assets/images/product.jpg"
          alt=""
        >
        <p class="line2">商品名字商品名字商品名字商品名字商品名字商品名字商品名字商品名字</p>
        <div class="price"><span>&yen;200.00</span>&nbsp;&nbsp;<span><del>&yen;300.00</del></span></div>
        <mt-button type="primary">立即购买</mt-button>
      </router-link>
      <router-link
        to=''
        class="pbox"
      >
        <img
          src="../assets/images/product.jpg"
          alt=""
        >
        <p class="line2">商品名字商品名字商品名字商品名字商品名字商品名字商品名字商品名字</p>
        <div class="price"><span>&yen;200.00</span>&nbsp;&nbsp;<span><del>&yen;300.00</del></span></div>
        <mt-button type="primary">立即购买</mt-button>
      </router-link>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {}
  }
}
</script>
<style lang="scss" scoped>
.mint-swipe {
  height: 200px;
  img {
    width: 100%;
  }
}
.nav {
  width: 100%;
  padding: 10px;
  a {
    width: 33.33%;
    float: left;
    .line2{
      font-size: 13px;
    }
    img {
      width: 100%;
      display: block;
    }
  }
}
.product {
  padding: 10px;
  .pbox {
    width: 48%;
    float: left;
    border: 1px solid #ccc;
    text-align: center;
    color: #888;
    box-shadow: 0px 0px 1px 1px hsla(240, 0, 0, 0.1);
    padding-bottom:10px;
    margin-top: 10px;
    .line2{
      display: -webkit-box;
      overflow: hidden;
      white-space: normal !important;
      text-overflow: ellipsis;
      word-wrap: break-word;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      font-size: 13px;
      line-height: 18px;
    }
    .price{
      padding: 10px;
      font-size: 12px;
      span:nth-child(1){
        font-size: 14px;
        color: #f00;
      }
    }
    img {
      width: 100%;
      display: block;
    }
  }
  .pbox:nth-of-type(even){
    margin-left: 10px;
  }
}
</style>
